home *** CD-ROM | disk | FTP | other *** search
/ il gioco del Kamasutra / Milo Manara Kamasutra.iso / mac / DATA / ParteIII / GameI / Spada.dir / 00033_Script_33 < prev    next >
Text File  |  1997-11-24  |  3KB  |  86 lines

  1. on mouseEnter
  2.   set the cursor of sprite 36 to [the number of cast "MouseOpen", the number of cast "MouseOpenMask"]
  3. end mouseEnte
  4.  
  5.  
  6. on mouseleave
  7.   
  8.   set the visible of sprite 36 to 0
  9.   
  10. end mouseleave
  11.  
  12.  
  13. on mousedown
  14.   
  15.   global oldloc, x0, y0, x1, y1
  16.   puppetsprite 36, true
  17.   set the cursor of sprite 36 to [the number of cast "MouseClose", the number of cast "MouseCloseMask"]
  18.   set x0 = the loch of sprite 36
  19.   set y0 = the locv of sprite 36
  20.   repeat while the stilldown
  21.     set the loc of sprite 36 to point(the mouseH,the mouseV)
  22.     updatestage
  23.   end repeat
  24.   Puppetsound 3,"Click2"
  25. end mousedown
  26.  
  27. on mouseUp
  28.   global oldloc, x0, y0, x1, y1
  29.   global oldloc, UomoTesto1, UomoTesto2, UomoTesto3, UomoCard1, UomoCard2, UomoCard3
  30.   global Coppia1, Coppia2, Coppia3, Test1, Test2, Test3
  31.   set the cursor of sprite 36 to [the number of cast "MouseOpen", the number of cast "MouseOpenMask"]
  32.   if (Test1 = 0) and (inside(the loc of sprite 36, the rect of sprite 14 ) = 1) then
  33.     set the loc of sprite 36 to oldloc
  34.     puppetsprite 36, 0
  35.     set the membernum of sprite 21 to (the membernum of sprite 36)
  36.     set the loc of sprite 21 to point(85, 361)
  37.     set UomoCard1 = the name of member (the membernum of sprite 36)  
  38.     set the text of member 17 to "Uomo " & (the name of member (the membernum of sprite 36))
  39.     put the text of member 17 into UomoTesto1
  40.     updatestage
  41.   else if (Test2 = 0) and (inside(the loc of sprite 36, the rect of sprite 15 ) = 1) then
  42.     set the loc of sprite 36 to oldloc
  43.     puppetsprite 36, 0
  44.     set the membernum of sprite 22 to (the membernum of sprite 36)
  45.     set the loc of sprite 22 to point(275, 361)
  46.     set UomoCard2 = the name of member (the membernum of sprite 36)
  47.     set the text of member 18 to "Uomo " & (the name of member (the membernum of sprite 36))
  48.     put the text of member 18 into UomoTesto2
  49.     updatestage
  50.   else if (Test3 = 0) and (inside(the loc of sprite 36, the rect of sprite 16 ) = 1) then
  51.     set the loc of sprite 36 to oldloc
  52.     puppetsprite 36, 0
  53.     set the membernum of sprite 23 to (the membernum of sprite 36)
  54.     set the loc of sprite 23 to point(465, 361)
  55.     set UomoCard3 = the name of member (the membernum of sprite 36)
  56.     set the text of member 19 to "Uomo " & (the name of member (the membernum of sprite 36))
  57.     put the text of member 19 into UomoTesto3
  58.     updatestage
  59.   else
  60.     put the loch of sprite 36 into x1
  61.     put the locv of sprite 36 into y1
  62.     set passo = integer(abs(x1-x0))
  63.     if x1 <> x0 then
  64.       if x1 > x0 then
  65.         repeat with n = 20 down to 1
  66.           set the loch of sprite 36 = (x1 - passo/n)
  67.           set the locv of sprite 36 = ((y1-y0)*(x1 - passo/n) + (x1*y0 -x0*y1))/(x1-x0)
  68.           updatestage
  69.         end repeat
  70.       else
  71.         repeat with n = 20 down to 1
  72.           set the loch of sprite 36 = (x1 + passo/n)
  73.           set the locv of sprite 36 = ((y1-y0)*(x1 + passo/n) + (x1*y0 -x0*y1))/(x1-x0)
  74.           updatestage
  75.         end repeat
  76.       end if
  77.     end if
  78.     
  79.     set the loch of sprite 36 = x0
  80.     set the locv of sprite 36 = y0
  81.     updatestage
  82.     
  83.   end if
  84.   
  85. end mouseUp
  86.